<template>
  <div class="container-main">
    <router-view v-if="isReloadActivity"></router-view>

    <!-- <router-view class="router-view"></router-view> -->
  </div>
</template>

<script>
export default {
  name: "App",
  watch: {
    $route: function (to, from) {
      document.body.scrollTop = 0;
      document.documentElement.scrollTop = 0;
    },
  },
  provide() {
    return {
      reload: this.reload,
    };
  },
  data() {
    return {
      isReloadActivity: true,
    };
  },
  methods: {
    reload() {
      this.isReloadActivity = false;
      this.$nextTick(() => {
        this.isReloadActivity = true;
      });
    },
  },
};
</script>

<style scoped>
.container-main {
  min-height: 100% !important;
}
</style>
